using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.TestDrivens;
using Pixysoft.Framework.Logs.Core;

namespace Pixysoft.Framework.Logs.TestCases
{
    [TestDriven(TestDrivenType.IntegrationTest, "LogDocumentSummary")]
    class UnitTest_005_LogDocumentSummary
    {
        private static IAssert assert = Assert.New(true);

        [TestStart]
        public static bool TestCaseStart()
        {
            return true;
        }

        [TestStop]
        public static void TestCaseStop()
        {
        }

        [TestStateSave]
        public static ITestDrivenDocument TestCaseStateSave()
        {
            return assert.Document;
        }

        [TestCase("Serialize")]
        public static void TestCase_000_Serialize()
        {
            LogDocumentSummary summary = new LogDocumentSummary();
            summary.CountOfDebug = 1;
            summary.CountOfError = 1;
            summary.CountOfFatal = 1;
            summary.CountOfInfo = 1;
            summary.CountOfWarn = 1;
            summary.RecordCount = 1;
            summary.TimeFrom = DateTime.Now;
            summary.TimeTo = DateTime.Now;

            assert.Write(summary.RawSerialize());

            Assert.Cache.Push(summary);
        }

    }
}
